# coding=utf-8

"""
# 方法一
def nubi(a, b, *args):
    print(args)


# nubi(1, 2, 3)
# nubi(*[1, 2, 3, 4, 5, 6])
"""

'''
# 方法二 *arge 接受位置参数，转成元组的方式
def nubi1(a, b, *args):
    print(args)
    print(args[0])


nubi1(1, 2, 3, 4, 5)
'''


# #方法三 **kwargs 把n个'关键字参数'转成字典的方式
# def nubi2(**kwargs):
#     print(kwargs)
#     print(kwargs['a'])
#
#
# nubi2(a=1, b=2, c=3)
# nubi2(**{'a': 9, 'b': 10})


# # 方法三 把n个'关键字参数'转成字典的方式
# def nubi2(tian, name="1", **kwargs):
#     print(kwargs)
#     print(tian)
#     print(name)
#     print(kwargs['a'])
#
#
# nubi2("wewe", a="1", b="2", name="10001")


# 方法合
def nubi3(tian, age=3, *args, **kwargs):
    print(tian)
    print(age)
    print(args)
    print(kwargs)


nubi3(1001, 5, high="111", length="900")
nubi3(1001, high="111", length="900", age=999)



